﻿// Copyright (C) 2012 Jeff Tanner <jeff00seattle@gmail.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

using System;
using System.IO;
using System.Diagnostics;
using System.Configuration;
using System.Configuration.Install;
using System.ComponentModel;

using WindowsAzure_FileBackup_Common;
using WindowsAzure_REST;

namespace WindowsAzure_FileBackup_Service
{
    [RunInstaller(true)]
    public partial class Service_Installer : System.Configuration.Install.Installer
    {
        public Service_Installer()
        {
            InitializeComponent();
        }

        private void serviceInstaller_AfterInstall(object sender, InstallEventArgs e)
        {

        }

        private void serviceInstaller_AfterUninstall(object sender, InstallEventArgs e)
        {
            if (System.Diagnostics.EventLog.SourceExists(Common.EventLogSourceAppConfig))
            {
                System.Diagnostics.EventLog.DeleteEventSource(Common.EventLogSourceAppConfig);
                System.Diagnostics.EventLog.Delete(Common.EventLogNameAppConfig);
            }
        }

        private void serviceProcessInstaller_AfterInstall(object sender, InstallEventArgs e)
        {

        }

        private void serviceProcessInstaller_AfterUninstall(object sender, InstallEventArgs e)
        {

        }
    }
}
